import { ApiResult, post } from "@/util/request";

//测试记录分页查询
export async function pageUserExamManage(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/userExam/pageUserExamManage", params);
}
//视频观看分页
export async function pageVideoSumWatch(params?: any): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/videoWatch/pageVideoSumWatch", params);
}
//视频观看统计
export async function videoSumWatch(params?: any): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/videoWatch/videoSumWatch", params);
}
//视频观看统计详情
export async function pageVideoSum(params?: any): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/videoWatch/pageVideoSum", params);
}
//视频观看地区统计
export async function pageVideoSumByAddr(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/videoWatch/pageVideoSumByAddr", params);
}
//视频观看企业统计
export async function pageVideoSumByEnterprise(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>(
    "/manage/v1/videoWatch/pageVideoSumByEnterprise",
    params,
  );
}
//资讯观看统计
export async function infomationReadSum(params?: any): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/infomationRead/infomationReadSum", params);
}
//分页资讯统计
export async function pageInfomationReadSum(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>(
    "/manage/v1/infomationRead/pageInfomationReadSum",
    params,
  );
}
//资讯统计详情
export async function pageInfomationSum(params?: any): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/infomationRead/pageInfomationSum", params);
}
//导出视频观看统计
export async function exportVideoSumWatch(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/videoWatch/exportVideoSumWatch", params, {
    responseType: "blob", //二进制流
    headers: {
      "Content-Type": "application/json;charset=utf-8",
    },
  });
}
//导出区域视频观看统计
export async function exporVideoSumByAddr(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>("/manage/v1/videoWatch/exporVideoSumByAddr", params, {
    responseType: "blob", //二进制流
    headers: {
      "Content-Type": "application/json;charset=utf-8",
    },
  });
}
//导出企业视频观看统计
export async function exporVideoSumByEnterprise(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>(
    "/manage/v1/videoWatch/exporVideoSumByEnterprise",
    params,
    {
      responseType: "blob", //二进制流
      headers: {
        "Content-Type": "application/json;charset=utf-8",
      },
    },
  );
}
//导出企业视频观看统计
export async function exporInfomationReadSum(
  params?: any,
): Promise<ApiResult<any>> {
  return await post<any>(
    "/manage/v1/infomationRead/exporInfomationReadSum",
    params,
    {
      responseType: "blob", //二进制流
      headers: {
        "Content-Type": "application/json;charset=utf-8",
      },
    },
  );
}
